Optimal. Leaf size=72 \[ \frac{a \tan ^3(c+d x)}{3 d}-\frac{a \tan (c+d x)}{d}+a x-\frac{b \cos (c+d x)}{d}+\frac{b \sec ^3(c+d x)}{3 d}-\frac{2 b \sec (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0778072, antiderivative size = 72, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 5, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.263, Rules used = {2722, 3473, 8, 2590, 270} \[ \frac{a \tan ^3(c+d x)}{3 d}-\frac{a \tan (c+d x)}{d}+a x-\frac{b \cos (c+d x)}{d}+\frac{b \sec ^3(c+d x)}{3 d}-\frac{2 b \sec (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2722
Rule 3473
Rule 8
Rule 2590
Rule 270
Rubi steps
\begin{align*} \int (a+b \sin (c+d x)) \tan ^4(c+d x) \, dx &=\int \left (a \tan ^4(c+d x)+b \sin (c+d x) \tan ^4(c+d x)\right ) \, dx\\ &=a \int \tan ^4(c+d x) \, dx+b \int \sin (c+d x) \tan ^4(c+d x) \, dx\\ &=\frac{a \tan ^3(c+d x)}{3 d}-a \int \tan ^2(c+d x) \, dx-\frac{b \operatorname{Subst}\left (\int \frac{\left (1-x^2\right )^2}{x^4} \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac{a \tan (c+d x)}{d}+\frac{a \tan ^3(c+d x)}{3 d}+a \int 1 \, dx-\frac{b \operatorname{Subst}\left (\int \left (1+\frac{1}{x^4}-\frac{2}{x^2}\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=a x-\frac{b \cos (c+d x)}{d}-\frac{2 b \sec (c+d x)}{d}+\frac{b \sec ^3(c+d x)}{3 d}-\frac{a \tan (c+d x)}{d}+\frac{a \tan ^3(c+d x)}{3 d}\\ \end{align*}
Mathematica [A] time = 0.037818, size = 81, normalized size = 1.12 \[ \frac{a \tan ^3(c+d x)}{3 d}+\frac{a \tan ^{-1}(\tan (c+d x))}{d}-\frac{a \tan (c+d x)}{d}-\frac{b \cos (c+d x)}{d}+\frac{b \sec ^3(c+d x)}{3 d}-\frac{2 b \sec (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.032, size = 98, normalized size = 1.4 \begin{align*}{\frac{1}{d} \left ( a \left ({\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{3}}{3}}-\tan \left ( dx+c \right ) +dx+c \right ) +b \left ({\frac{ \left ( \sin \left ( dx+c \right ) \right ) ^{6}}{3\, \left ( \cos \left ( dx+c \right ) \right ) ^{3}}}-{\frac{ \left ( \sin \left ( dx+c \right ) \right ) ^{6}}{\cos \left ( dx+c \right ) }}- \left ({\frac{8}{3}}+ \left ( \sin \left ( dx+c \right ) \right ) ^{4}+{\frac{4\, \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{3}} \right ) \cos \left ( dx+c \right ) \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 2.1333, size = 88, normalized size = 1.22 \begin{align*} \frac{{\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a - b{\left (\frac{6 \, \cos \left (d x + c\right )^{2} - 1}{\cos \left (d x + c\right )^{3}} + 3 \, \cos \left (d x + c\right )\right )}}{3 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.81522, size = 182, normalized size = 2.53 \begin{align*} \frac{3 \, a d x \cos \left (d x + c\right )^{3} - 3 \, b \cos \left (d x + c\right )^{4} - 6 \, b \cos \left (d x + c\right )^{2} -{\left (4 \, a \cos \left (d x + c\right )^{2} - a\right )} \sin \left (d x + c\right ) + b}{3 \, d \cos \left (d x + c\right )^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sin{\left (c + d x \right )}\right ) \tan ^{4}{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]